package org.eerbaar.lang;

import org.eerbaar.lang.expressions.Equal;
import org.eerbaar.lang.expressions.If;
import org.eerbaar.lang.expressions.IntVar;
import org.eerbaar.lang.expressions.Loop;
import org.eerbaar.lang.expressions.StringVar;

public class L {

    public static Expression condition(Expression e) {
        return new If(e);
    }

    public static Expression equal(Expression e1, Expression e2) {
        return new Equal(e1, e2);
    }

    public static Expression integer(int n) {
        return new IntVar(n);
    }

    public static Expression loop(int start, int end) {
        return new Loop(start, end);
    }

    public static Expression loop(int start, int end, Expression e) {
        return new Loop(start, end, e);
    }

    public static Expression ref(String name) {
        return new Reference(name);
    }

    public static Expression string(String value) {
        return new StringVar(value);
    }

    public static Expression var(int value) {
        return new IntVar(value);
    }

    public L() {
        //
    }

}
